<template>
  <div class="login-container">
    <div class="content">
      <div class="login-box">
        <div class="logo-box">
          <img src="../../assets/image/uxdl.png" alt="" />
        </div>

        <el-form
          ref="form"
          :model="loginForm"
          class="login-form"
          refs="loginFormRef"
          :rules="loginFormRules"
        >
          <el-form-item prop="name">
            <el-input
              v-model="loginForm.name"
              placeholder="请输入用户名"
              clearable
            ></el-input>
          </el-form-item>
          <el-form-item prop="password">
            <el-input
              v-model="loginForm.password"
              type="password"
              placeholder="请输入密码"
              clearable
              show-password
            ></el-input>
          </el-form-item>
          <el-form-item class="forget">
            <span>忘记密码</span>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="login" class="loginBtn"
              >登录</el-button
            >
          </el-form-item>
        </el-form>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'LoginIndex',
  components: {},
  props: {},
  data() {
    return {
      // 登录表单信息
      loginForm: {
        name: '',
        password: ''
      },
      // 登录表单验证规则
      loginFormRules: {
        name: [
          { required: true, message: '请输入用户名', trigger: 'blur' },
          { min: 5, max: 9, message: '请输入5到9位字符', trigger: 'blur' }
        ]
      }
    }
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {
    // 点击登录
    login() {}
  }
}
</script>
<style lang="less" scoped>
.login-container {
  background: url('../../assets/image/bg.png') no-repeat center;
  background-color: #0c0c26;

  height: 100%;
  overflow: hidden;
  .content {
    width: 1215px;
    margin: 0 auto;
    height: 100%;
    background-size: cover;
    // background-color: #0c0c26;
    background: url('../../assets/image/bg.png') no-repeat center;
  }
  .login-box {
    position: absolute;
    width: 460px;
    height: 340px;
    background: #ffffff;
    border-radius: 20px;
    // margin: 275px auto 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -63%);
    background-color: #fff;
    .logo-box {
      position: absolute;
      top: -65px;
      left: 50%;

      transform: translateX(-50%);
    }
    .login-form {
      position: absolute;
      width: 100%;
      left: 0;
      bottom: 23px;
      padding: 0px 40px;
      box-sizing: border-box;
      /deep/ .el-input {
        .el-input__inner {
          padding: 0;
          border: 0;
          border-radius: 0;
          border-bottom: 1px solid #9595b1;
        }
      }
      .forget {
        text-align: right;

        font-size: 14px !important;
        font-family: 'Microsoft YaHei';
        font-weight: bold;
        color: #999999;
      }
      /deep/ .loginBtn {
        width: 100%;

        height: 60px;
        background: #373768;
        border-radius: 6px;
        text-align: center;
        font-size: 24px;
        font-family: 'Microsoft YaHei';
        // font-weight: bold;
        color: #ffffff;
        letter-spacing: 20px;
        span {
          padding-left: 12px;
        }
      }
    }
  }
}
</style>
